<template>
    <header>
        <span class="icon-left" v-if="back" @click="$router.go(-1)"><</span>
        <span class="icon-right" v-if="login">login</span>
        <span class="icon-right" v-if="home" @click="$router.push({path:'/bookCity'})">home</span>
        <slot></slot>
    </header>
</template>
<script>
export default {
    props:{
        back:{
            type:Boolean,
            default:false
        },
        login:{
            type:Boolean,
            default:false
        },
        home:{
            type:Boolean,
            default:false
        }
    }
}
</script>

<style lang="scss">
    header{
        width:100%;
        height: 44px;
        background: #eee;
        position:relative;
        .icon-left{
            width:44px;
            height:44px;
            position: absolute;
            top:0;
            left:0;
        }
        .icon-right{
            width:44px;
            height:44px;
            position: absolute;
            top:0;
            right:0;
        }
    }
</style>

